import _fetch from './request'
//
export function technic (data) {
  return _fetch({
    // 默认get方式可以不写 get需要params方式传参
    url: '/articles/technic',
    params: data
  })
}
// export {echnic}  和上面那种都是按需导出

// 热门职位
export function chartData () {
  return _fetch({
    url: '/chart-data/hot'
  })
}
// 面经分享数据
export function articleShare (params) {
  return _fetch({
    url: '/articles/share',
    params
  })
}
// 面经热搜
export function articlesShareTopSearch () {
  return _fetch({
    url: '/articles/shareTopSearch'
  })
}
// 面经详情
export function articelsI (id) {
  return _fetch({
    url: '/articles/share/' + id
  })
}
// 评论
export function articlesComments (id, params) {
  return _fetch({
    url: '/articles/comments/' + id,
    params
  })
}
// 面经收藏
export function articlesCollect (data) {
  return _fetch({
    method: 'post',
    url: '/articles/collect',
    needToken: true,
    data
  })
}
// 点赞
export function articlesStar (data) {
  return _fetch({
    method: 'post',
    url: '/articles/star',
    needToken: true,
    data
  })
}
// 面经评论点赞
export function articleCommentsStar (data) {
  return _fetch({
    method: 'post',
    url: '/article-comments/star',
    needToken: true,
    data
  })
}
// 发表评论
export function SendComment (data) {
  return _fetch({
    method: 'post',
    url: '/articles/comments',
    needToken: true,
    data
  })
}
